{php}
	$_data = \Ebcms::db() -> select('slide','*',[
			'ORDER' => [
					'weight' => 'ASC',
					'id' => 'ASC',
			]
	]);
{/php}
<div id="slide" class="carousel slide" data-ride="carousel" style="margin-bottom: 20px;">
	<ol class="carousel-indicators">
		{foreach $_data as $key => $v}
		<li data-target="#slide" data-slide-to="{$key}" class="{if !$key}active{/if}"></li>
		{/foreach}
	</ol>

	<div class="carousel-inner" role="listbox">
		{foreach $_data as $key => $v}
		<div class="item {if !$key}active{/if}">
		<a href="{$v.url}" target="_blank">
			<img src="{:real_url($v['image'])}" alt="{$v.title}" style="width: 100%;display: inline-block;">
			<div class="carousel-caption">
				{$v.description}
			</div>
		</a>
		</div>
		{/foreach}
	</div>
</div>